/**
 * 
 */
package org.mspring.crm.entity.permission;

import java.io.Serializable;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @author Gao Youbo
 * @since Feb 29, 2012
 */
@Entity
@Table(name = "role_item")
public class RoleItem implements Serializable {
    private RoleItemPK roleItemPK;

    /**
     * 
     */
    public RoleItem() {
        // TODO Auto-generated constructor stub
    }

    /**
     * 
     */
    public RoleItem(RoleItemPK roleItemPK) {
        // TODO Auto-generated constructor stub
        this.roleItemPK = roleItemPK;
    }

    @EmbeddedId
    @AttributeOverrides( { @AttributeOverride(name = "roleId", column = @Column(name = "role_id", nullable = false)), @AttributeOverride(name = "itemId", column = @Column(name = "item_id", nullable = false)) })
    public RoleItemPK getRoleItemPK() {
        return roleItemPK;
    }

    public void setRoleItemPK(RoleItemPK roleItemPK) {
        this.roleItemPK = roleItemPK;
    }

}